import net from 'net'
/* 连接server端，并且监听返回的数据 */
const client = net.createConnection({
  host: '127.0.0.1',
  port: 3000,
})

client.on('data', data => {
  console.log(data.toString())
})
